package com.company;

import java.util.HashMap;

public class Room {
    private String description;
    HashMap<String,Room> exits = new HashMap<String,Room>();
    public Room(String description) {
        this.description = description;
    }
    public void setExit(String dir,Room room) {
        exits.put(dir, room);
    }
    public String getExitdesc() {
        StringBuffer sb = new StringBuffer();
        for(String dir :exits.keySet()) {
            sb.append(dir);
            sb.append(" \n");
        }
        return sb.toString();
    }
    public Room getExit(String dir) {
        return exits.get(dir);
    }
    public String toString() {
        return ""+description;
    }
}








